package com.example.zk.service.impl;

import com.example.zk.mapper.MenuMapper;
import com.example.zk.model.Menu;
import com.example.zk.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by it001 on 2018-12-26.
 */
@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuMapper menuMapper;


    @Override
    @Transactional //开启事务
    public List<Menu> getAllMenuByRoleId(Long id) {
        return menuMapper.getRoleMenuList(id,0);
    }
}
